package com.xframework.security.api;

import com.xframework.api.BaseRpcService;
import com.xframework.inteceptor.FeignRequestInteceptor;
import com.xframework.security.model.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@FeignClient(name = "xframework-security-service", configuration = FeignRequestInteceptor.class)
public interface SecurityRestService extends BaseRpcService {
    @RequestMapping(value = "/security/Login", method = RequestMethod.POST)
    public SecurityAccount login(@RequestBody SecurityAccount securityAccount, HttpServletRequest request, HttpServletResponse response);
}